using UnityEngine;
using System.Collections;

public class PushButton : MonoBehaviour {

    public GameObject Gate;
    public GameObject TriggerObject;
   
	void Start () {
       
	}
	
	// Update is called once per frame
	void Update () {
	    
	}

    void OnCollisionEnter(Collision Col)
    {
        if (Col.gameObject.tag == "MoveableBlock")
        {

            Debug.Log("Gate Destory");
            Destroy(Gate);
            this.transform.Translate(0, -2, 0);
        }
  
    }

   
}
